﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Ajax.aspx.cs" Inherits="demo.Pages.Ajax" %>

<%@ Register Assembly="Water" Namespace="Water.Web.Controls" TagPrefix="page" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <fieldset>
            <legend>支持ajax,控制简单灵活</legend>
            <ul>
                <li>设置控件是否能引起回调，即是否触发ajax</li>
                <li>设置回调的目标.即,回调后发生变化的控件ID列表。注:控件ID间用逗号(,)隔开</li>
                <li>设置控件的HTML呈现模式，div和span模式</li>
                <li>设置是否自动回调更新</li>
                <li>ajax调试</li>
                <li>长时间(>10毫秒)处理ajax的等待效果</li>
            </ul>
        </fieldset>
        <fieldset>
            <legend>demo</legend>
            <ul>
                <li>IsCallBack="true",能引起回调,该属性默认为true;CallBackTargets="Label1"设置回调更新的控件<br />
                    <page:Button ID="Button1" runat="server" Text="ajax" OnClick="Button1_Click" CallBackTargets="Label1" />
                    <page:Label ID="Label1" runat="server" Text="water ajax1" BackColor="#f2f2f2"></page:Label>
                </li>
                <li>IsCallBack="false",不能引起回调<br />
                    <page:Button ID="Button2" runat="server" Text="非ajax" IsCallBack="false" OnClick="Button2_Click" />
                    <page:Label ID="Label2" runat="server" Text="water1" BackColor="#f2f2f2"></page:Label>
                </li>
                <li>AutoUpdatedAfterCallBack="true",控件自动回调更新<br />
                    <page:Button ID="Button3" runat="server" Text="button" />
                    <page:Label ID="Label3" runat="server" Text="AutoUpdatedAfterCallBack1" AutoUpdatedAfterCallBack="true" BackColor="#f2f2f2"></page:Label>
                </li>
                <li>通过如下javascript脚本可解决ajax出错难以发现的问题
                    <pre>
                    $Page.AjaxDebug = true;
                </pre>
                </li>
            </ul>
        </fieldset>
    </div>
    </form>
    <script>
        $Page.AjaxDebug = true;
    </script>
</body>
</html>
